package com.parking.mgr.useraccount.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.parking.mgr.useraccount.model.entity.BasicMenuEntity;
import com.parking.mgr.useraccount.model.param.BasicMenuParam;
import com.parking.mgr.useraccount.model.vo.BasicMenuVO;

import javax.servlet.http.HttpServletRequest;
import java.util.Collection;
import java.util.List;

/**
 * @ClassName BasicMenuService
 * @Description 功能菜单service接口
 * @Auther: zhijianpu
 * @Date: 2023/5/19
 */
public interface BasicMenuService extends IService<BasicMenuEntity> {

    /**
     * 功能菜单列表(树表)
     *
     * @param basicMenuParam 查询参数
     * @return 菜单树列表
     */
    List<BasicMenuVO> list(BasicMenuParam basicMenuParam, HttpServletRequest request);

    /**
     * 系统菜单列表(树)启用状态
     *
     * @param basicMenuParam
     * @param request
     * @return
     */
    List<BasicMenuVO> listEnable(BasicMenuParam basicMenuParam, HttpServletRequest request);

    /**
     * 系统菜单列表（不区分状态）
     *
     * @return 菜单树列表
     */
    List<BasicMenuVO> listAll(HttpServletRequest request);

    /**
     * 系统功能菜单列表(树)
     *
     * @return
     */
    List<BasicMenuVO> treeMenuE(HttpServletRequest request);

    /**
     * 添加系统菜单
     *
     * @param basicMenuParam 添加参数
     */
    void add(BasicMenuParam basicMenuParam, HttpServletRequest request);

    /**
     * 删除系统菜单
     *
     * @param ids
     */
    void delete(Collection<String> ids, HttpServletRequest request);

    /**
     * 编辑功能菜单
     *
     * @param basicMenuParam
     */
    void edit(BasicMenuParam basicMenuParam, HttpServletRequest request);

    /**
     * 移动功能菜单
     */
    void move(String currentId, String newId);

    /**
     * 根据所属角色功能菜单ID获取菜单URL
     *
     * @param roleMenuIds
     * @return
     */
    List<String> getMenuUrlByMenuIds(List<String> roleMenuIds);


    /**
     * 未登录可访问菜单树(缓存)
     *
     * @return
     */
    List<BasicMenuVO> acceMenuETreeByCache(HttpServletRequest request);

    /**
     * 未登录可访问菜单列表(缓存)
     *
     * @return
     */
    List<BasicMenuVO> acceMenuEListByCache(HttpServletRequest request);

    /**
     * 未登录可访问功能列表(缓存)
     *
     * @return
     */
    List<BasicMenuVO> acceMenuFListByCache(HttpServletRequest request);
}
